{% extends "base.html" %}
{% block css %}
    <link href="static/css/duallistbox/bootstrap-duallistbox.css" rel="stylesheet">
{% endblock %}
{% block content %}
<main class="app-content">
    <div class="app-title">
        <div>
            <h1><i class="fa fa-th-list"></i>&nbsp;Subdomain Brute</h1>
            <p></p>
        </div>
        <ul class="app-breadcrumb breadcrumb side">
            <li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
            <li class="breadcrumb-item">首页</li>
            <li class="breadcrumb-item active"><a href="#">New Brute</a></li>
        </ul>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="tile">
                <div class="tile-body">
                    <div id="sampleTable_wrapper" class="dataTables_wrapper container-fluid dt-bootstrap4 no-footer">
                        <div class="row"><div class="col-sm-12 col-md-6">
                            <div class="dataTables_length" id="sampleTable_length">
                                <a class="btn btn-primary" href="#" data-target="#newDomain" data-toggle="modal" title="Add Plugins">
                                    <i class="fa fa-plus-square fa-lg"></i> New Domain</a>
                                <br>
                                <br>
                            </div>
                        </div>
                        </div>

                        <table class="table table-hover table-bordered" id="sampleTable">
                            <thead>
                            <tr class="text-center">
                                <th>Name</th>
                                <th>Domain</th>
                                <th>Status</th>
                                <th>Date</th>
                                <th>Manage</th>
                            </tr>
                            </thead>
                            <tbody>
                            {% for i in github_tasks %}
                                <tr class="center">
                                    <td>
                                        <a href="subdomain-list?domain={{ i['_id'] }}">{{ i['domain_name'] }}</a>
                                    </td>
                                    <td>{{ i['domain'] | join(',') | truncate(15 , True)}}</td>
                                    <td>{{ i['status'] }}</td>
                                    <td>{{ i['date'] }}</td>
                                    <td class="text-center">
                                        <div class="hidden-sm hidden-xs action-buttons">
                                            <a id="test1" role="button" href="#" onclick="delete_domain('{{ i['_id'] }}')" title="Delete">
                                                <i class="fa fa-trash-o"></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>

{% endblock %}
{% block js %}
    <!-- Data table plugin-->
    <script type="text/javascript" src="static/js/plugins/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="static/js/plugins/dataTables.bootstrap.min.js"></script>
    <script src="static/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script src="static/js/jquery/jquery.bootstrap-duallistbox.js"></script>
    <script src="static/js/server/subdomain-brute.js"></script>
{% endblock %}
